Skip to content

Install yang modules during build - #460

Merged
wkz merged 20 commits into
mainfrom
install-yang-modules-during-build
May 24, 2024
Merged

wkz merged 20 commits into
mainfrom
install-yang-modules-during-build

Conversation

@mattiaswal

@mattiaswal mattiaswal commented May 21, 2024 •

Copy link
Copy Markdown
Contributor

Description

  • Install the yang modules during build instead of runtime
  • Upgrade sysrepo, netopeer2, libnetconf2 and libyang
  • Fix misc issues caused by the upgrade
  • The upgrade also upgrades some models (ietf-netconf-server and ietf-ssh-server and some more included from them
  • THIS IS BREAKING CHANGES old configurations will not work anymore due to the model upgrades described above.

Other information

Checklist

Tick relevant boxes, this PR is-a or has-a:

  • Bugfix
    • Regression tests
    • ChangeLog updates (for next release)
  • Feature
    • YANG model change => revision updated?
    • Regression tests added?
    • ChangeLog updates (for next release)
    • Documentation added?
  • Code style update (formatting, renaming)
  • Refactoring (please detail in commit messages)
  • Build related changes
  • Documentation content changes
  • Other (please describe): Only changes that users not noticed.

@mattiaswal
mattiaswal requested review from troglobit and wkz May 21, 2024 08:29
@mattiaswal
mattiaswal force-pushed the install-yang-modules-during-build branch from e68110b to e6869b0 Compare May 21, 2024 18:37
@mattiaswal

mattiaswal commented May 22, 2024 •

Copy link
Copy Markdown
Contributor Author

Tested pass on hardware:

s Execution
`-- s 0001-all.yaml
    |-- o 0002-reproducible.py
    |-- o 0003-wait.py
    |-- o 0004-Misc tests
    |   `-- o 0005-operational_all.py
    |-- o 0006-ietf-system
    |   |-- o 0007-hostname.py
    |   |-- o 0008-add_delete_user.py
    |   |-- o 0009-timezone.py
    |   `-- o 0010-timezone_utc_offset.py
    |-- o 0011-ietf-interfaces
    |   |-- o 0012-vlan_ping.py
    |   |-- o 0013-ipv4_address.py
    |   |-- o 0014-iface_phys_address.py
    |   |-- o 0015-iface_status.py
    |   `-- o 0016-routing_basic.py
    |-- o 0017-infix-interfaces
    |   |-- o 0018-bridge_basic.py
    |   |-- o 0019-bridge_veth.py
    |   |-- o 0020-dual_bridge.py
    |   |-- o 0021-bridge_vlan.py
    |   |-- o 0022-ipv4_autoconf.py
    |   |-- o 0023-bridge_fwd_sgl_dut.py
    |   |-- o 0024-bridge_fwd_dual_dut.py
    |   |-- o 0025-bridge_vlan_separation.py
    |   |-- o 0026-igmp_basic.py
    |   |-- o 0027-igmp_vlan.py
    |   `-- o 0028-static_multicast_filters.py
    |-- s 0029-ietf-routing
    |   |-- o 0030-static_routing.py
    |   |-- o 0031-ospf_basic.py
    |   |-- o 0032-ospf_unnumbered_interface.py
    |   `-- s 0033-ospf_multiarea.py
    |-- o 0034-infix-containers
    |   |-- o 0035-container_basic.py
    |   |-- o 0036-container_bridge.py
    |   |-- o 0037-container_phys.py
    |   `-- o 0038-container_veth.py
    |-- o 0039-infix-dhcp
    |   |-- o 0040-dhcp_basic.py
    |   |-- o 0041-dhcp_router.py
    |   `-- o 0042-dhcp_routes.py
    `-- o 0043-ietf-hardware
        `-- o 0044-usb.py
06:28:55 infamy1:test # 

@mattiaswal
mattiaswal force-pushed the install-yang-modules-during-build branch 2 times, most recently from ec395ce to 7d6a05b Compare May 22, 2024 19:54

@troglobit troglobit left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, and unbelievably with such a huge change it's almost flawless! Comitted a small change to simplify the makedev permissions for /etc/sysrepo/data (verified).

Let's review together in the office today, I'm sure our other colleague will have at least one or two comments.

@wkz wkz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A-W-E-S-O-M-E

Comment thread doc/ChangeLog.md Resolved
Comment thread src/confd/scripts/setup.sh Resolved
Comment thread src/confd/src/infix-factory.c Resolved
mattiaswal and others added 20 commits May 24, 2024 11:08
This to hopefully speed up boot, do as little as possible
during boot.

* New modules needs to be added to src/confd/scripts/setup.sh
* Permission needs to be changed post-build for YANG files,
  see CONFD_PERMISSIONS in confd.mk
This also adds support in sysrepot to install factory config on boot,
default is only to allow it when installing the module, we can not do
that anymore, since the modules is installed during build and the factory
config (or failure) can only be determed when booted.
This was removed when the new version of ietf-netconf-server was
introduced with the new version of libnetconf.
The one installed with netopeer2 includes files that exist on ubuntu
but not in buildroot.
More robust and less code duplication
This is a hardened requirement i latest libyang(/sysrepo)
This helps yanger to generate a valid configuration.
Before we generated an invalid YANG model but it was
still accepted by libyang, but now, since the upgrade
it is not.
Now there is no guarantee that the control-plane-protocol array
exist in operational.
Do not use netopeer-created shm-path
No reason to be that narrow (10s) change to 30s
And remove not needed environment variable
Not needed anymore since all YANG modules should be loaded at
build.
@mattiaswal
mattiaswal force-pushed the install-yang-modules-during-build branch from 9c9825f to 2cf0c27 Compare May 24, 2024 09:14
@wkz
wkz merged commit 0b38164 into main May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade sysrepo, liyang, libnetconf, netopeer2, et al Refactor YANG bootstrap from online to offline

3 participants